package idv.cjcat.stardust.common.errors ;

	import idv.cjcat.stardust.common.StardustElement;
	
	/**
	 * This error is thrown when an <code>XMLBuilder</code> object encounters more than one elements having the same name.
	 */
	public class DuplicateElementNameError extends Error {
		
		/**
		 * 
		 */
		private static final long serialVersionUID = 1L;
		
		private StardustElement _element1;
		private StardustElement _element2;
		private String _name;
		
		public DuplicateElementNameError(String message, String elementName, StardustElement element1, StardustElement element2) {
			super(message);
			_element1 = element1;
			_element2 = element2;
			_name = elementName;
		}
		
		public StardustElement getElement1() { return _element1; }
		public StardustElement getElement2() { return _element2; }
		public String getElementName() { return _name; }
	}
